package response

const (
	SUCCESS      = 200
	FAIL         = 500
	VALID_ERROR  = 400
	UNAUTHORIZED = 402
	SYSTEM_ERROR = -1
)

var codeMsg = map[int]string{
	SUCCESS:      "操作成功",
	FAIL:         "操作失败",
	VALID_ERROR:  "参数错误",
	UNAUTHORIZED: "未登录",
	SYSTEM_ERROR: "系统异常",
}

// GetMsg 获取状态码提示信息
func GetMsg(code int) string {
	return codeMsg[code]
}
